<?php

namespace App\Controllers;

class Home extends BaseController
{
    public function index(): string
    {
        $parser = \Config\Services::parser();
        $fields = [
            'title' => 'Home',
            'heading' => 'Home',
            'footer' => 'Copyright Xavier'
        ];
        return $parser->setData($fields)
            ->render('templates\top') .
            $parser ->render('home').
            $parser->setData($fields)
                ->render('templates\bottom');
    }
}
